﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonInformation.aspx.cs"
    Inherits="NJL.WebManage.PersonInformation" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <script type="text/javascript">
        function checkCode() {
            var regQQ = /^\d{5,10}$/; //验证QQ号码正则表达式
            var regCellPhone = /^1[3|4|5|8][0-9]\d{4,8}$/; //验证手机号码正则表达式
            var regEmail = /\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;  //验证电子邮件正则表达式
            var regTel = /(\(\d{3}\)|\d{3}-)?\d{8}/;                          //验证电话号码;
            var txtUserName = document.getElementById("<%=txtRealName.ClientID %>").value;
            var txtQQ = document.getElementById("<%=txtQQ.ClientID %>").value;
            var txtCellPhone = document.getElementById("<%=txtCellPhone.ClientID %>").value;
            var txtMsn = document.getElementById("<%=txtMsn.ClientID %>").value;
            var txtTel = document.getElementById("<%=txtTel.ClientID %>").value;
            var txtEmail = document.getElementById("<%=txtEmail.ClientID %>").value;
            if (txtUserName == "") {
                alert("请输入您的真实姓名");
                return false;
            }
            if (txtQQ != "") {
                if (regQQ.exec(txtQQ) == null) {
                    alert("请输入5-10位QQ号码");
                    return false;
                }
            }
            if (txtCellPhone != "") {
                if (regCellPhone.exec(txtCellPhone) == null) {
                    alert("请输入正确的手机号码");
                    return false;
                }
            }
           if(txtTel!="")
            {
             if(regTel.exec(txtTel)==null)
             {
               alert("请输入正确的电话号码格式");
               return false;
             }
            }
            if (txtMsn != "") {
                if (regEmail.exec(txtMsn) == null) {
                    alert("请输入正确的MSN格式");
                    return false;
                }
            }
            if (txtEmail != "") {
                if (regEmail.exec(txtEmail) == null) {
                    alert("请输入正确的电子邮件格式");
                    return false;
                }
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="gray_bd">
        <div class="table_title">
            个人管理-信息维护</div>
        <div class="pad5px">
            <table align="center" cellspacing="0" style="width: 100%">
                <tr>
                    <td style="width: 120px; text-align: right;">
                        真实姓名:
                    </td>
                    <td>
                        <asp:TextBox ID="txtRealName" runat="server" MaxLength="10"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        QQ:
                    </td>
                    <td>
                        <asp:TextBox ID="txtQQ" runat="server" MaxLength="10"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        手机:
                    </td>
                    <td>
                        <asp:TextBox ID="txtCellPhone" runat="server" MaxLength="11"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        电话:
                    </td>
                    <td>
                        <asp:TextBox ID="txtTel" runat="server" MaxLength="20"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        MSN:
                    </td>
                    <td>
                        <asp:TextBox ID="txtMsn" runat="server" MaxLength="25"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                      <tr>
                    <td style="width: 120px; text-align: right;">
                        电子邮件:
                    </td>
                    <td>
                        <asp:TextBox ID="txtEmail" runat="server" MaxLength="25"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        <asp:Button ID="btnSubmit" runat="server" Text="提交" OnClick="btnSubmit_Click" OnClientClick="return checkCode()" />
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
            </table>
        </div>
    </div>
    </form>
</body>
</html>
